#我的帖子页
from common.com import ForumDriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait



class PostInform:
    driver = ""
    url = ""
    def __init__(self):
        self.url= ("http://127.0.0.1:58080/index.html")
        self.driver = ForumDriver.driver
        self.driver.get( self.url )


    def Pose(self):
        #点击进入我的帖子
        self.driver.find_element(By.CSS_SELECTOR,"#index_nav_avatar").click()
        self.driver.find_element( By.CSS_SELECTOR, "#index_user_profile" ).click()
        # 用户头像
        self.driver.find_element( By.CSS_SELECTOR, "#profile_avatar" )
        # 用户昵称
        self.driver.find_element( By.CSS_SELECTOR,"#profile_nickname")
        #个人介绍
        self.driver.find_element( By.CSS_SELECTOR, "#bit-forum-content > div.page-body > div > div > div.col-lg-4 > div > div > div > div > h2" )
        #发帖数
        self.driver.find_element( By.CSS_SELECTOR, "#bit-forum-content > div.page-header.d-print-none > div > div > div.col > div > div:nth-child(1)")
        #邮箱
        self.driver.find_element( By.CSS_SELECTOR, "#bit-forum-content > div.page-header.d-print-none > div > div > div.col > div > div:nth-child(2)")
        #注册日期
        self.driver.find_element( By.CSS_SELECTOR, "#bit-forum-content > div.page-header.d-print-none > div > div > div.col > div > div:nth-child(3)")
        #屏幕截图
        ForumDriver.getScreenShot()


